<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="vue.js"></script>
</head>
<body>
<div id="app">
    <input v-model="message" @focus="focus">
    <button id="click" @click="update">点我{{message}}</button>
</div>
<script type="text/javascript">
for (var i = 0; i < 100000; i++) {
	//localStorage.setItem('test'+i,i);
	//console.log('第'+i+'次');
};
</script>
<script type="text/javascript">
    var vm = new Vue({
    el:'#app',
    data:{
        message:100
    },
    created:function () {
        if(localStorage.getItem('click')){
            this.message = localStorage.getItem('click');
        }
    },
    methods:{
        update:function(){
            this.message ++;
            localStorage.setItem('click',this.message);
        },
        change:function () {
            console.log('change 时间');
        },
        blur:function () {
            console.log('blur 时间');
        },
        focus:function () {
            console.log('focus 时间');
        }
    }
})
</script>
</body>
</html>